package com.example.weather.navigation

import android.util.SparseArray
import androidx.navigation.Navigation
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.NavigationUI
import com.example.library_base.base.BaseActivity
import com.example.weather.R
import com.google.android.material.bottomnavigation.BottomNavigationView

class NavigationActivity:BaseActivity(R.layout.activity_navigation) {
    override fun getVariableSparseArray(): SparseArray<Any> {
        val variables = SparseArray<Any>()
        return variables
    }

    override fun initView() {
        val bottomNavigationView = findViewById<BottomNavigationView>(R.id.nav_view)
        val appBarConfiguration = AppBarConfiguration.Builder(bottomNavigationView.menu).build()
        val navController = Navigation.findNavController(this, R.id.nav_host_fragment)

        NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration)
        NavigationUI.setupWithNavController(bottomNavigationView, navController)
    }

    override fun requestData() {

    }
}